package gothrottler

// worker 任务
type worker struct {
	fn     func(args ...interface{})
	fnArgs []interface{}
}

// run 执行任务
func (w *worker) run() {
	if w.fn == nil {
		return
	}

	if w.fnArgs == nil {
		w.fn()
	} else {
		w.fn(w.fnArgs...)
	}
}
